package com.mustafaiev.tair.cts.facade;

import java.util.List;

import com.mustafaiev.tair.cts.exeptions.DataNotRemovedException;
import com.mustafaiev.tair.cts.exeptions.DataNotStoredException;
import com.mustafaiev.tair.cts.tapestry.dto.BasketDTO;

/**
 * @author tair
 * 
 */
public interface IBasketFacade extends ICostTrackingSystemFacade {

	/**
	 * Saves basket into database
	 * 
	 * @param basket
	 */
	void save(BasketDTO basket) throws DataNotStoredException;

	/**
	 * Retrieves all baskets from database
	 * 
	 * @return List<BasketDto>
	 */
	List<BasketDTO> retrieveBaskets();

	/**
	 * Retrieves all baskets which are not in batch from database
	 * 
	 * @return List<BasketDTO>
	 */
	List<BasketDTO> retrieveNonBatchedBaskets();

	/**
	 * Retrieves basket by passed ID
	 * 
	 * @param basketId
	 * @return {@link BasketDTO}
	 */
	BasketDTO retrieveBasket(Long basketId);

	/**
	 * Deletes batch of baskets by passed list
	 * 
	 * @param List
	 *            dtos
	 */
	void deleteBatch(List<BasketDTO> dtos) throws DataNotRemovedException;

	/**
	 * Deletes basket by passed ID
	 * 
	 * @param basketId
	 */
	void delete(Long basketId);
}
